package cn.maidouya.hrm.feignClient;

import cn.maidouya.hrm.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class SystemLoginUserFeign implements FallbackFactory<ISystemLoginUserFeign> {

    @Override
    public ISystemLoginUserFeign create(Throwable throwable) {
        return new ISystemLoginUserFeign() {
            @Override
            public AjaxResult loadLoginUserById(Long id) {
                return AjaxResult.me().setMessage("获取失败");
            }
        };
    }
}
